#ifndef NOTIFIER_H
#define NOTIFIER_H

#include "listener.h"

#include <boost/shared_ptr.hpp>
#include <boost/thread/mutex.hpp>

#include <list>
using namespace std;

namespace network {
	class notifier {
	public:
		virtual ~notifier() {}

		virtual void add_listener(
			boost::shared_ptr<network::listener> l);
		virtual void remove_listener(
			boost::shared_ptr<network::listener> l);
	protected:
		void fire_listener();
	private:
		list<boost::shared_ptr<network::listener> > _list;
		boost::mutex _mon;
	};
}

#endif
